package com.hjtm.easypigfarm.fragment;

import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.hjtm.easypigfarm.R;
import com.hjtm.easypigfarm.utility.PigUtils;



public class FragmentAbout extends Fragment {
    
    private TextView mVersion;
    private Context mContext;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
	}

	@Override
	public View onCreateView(LayoutInflater inflater,
			ViewGroup container,  Bundle savedInstanceState) {
	    mContext = getActivity();
	    View v = inflater.inflate(R.layout.about, null);
	    mVersion = (TextView) v.findViewById(R.id.version);
        String ver  = getResources().getString(R.string.versions);   

	    String version = String.format(ver, PigUtils.getVersion(mContext)); 
	    mVersion.setText(version);
		return v;
	}

}
